<template>
	<view>
		<view class="nav-box">
			<view :style="{height:statusH}"></view>
			<view class="nav">
				<view class="left"></view>
				<view class="title">{{title}}</view>
				<view class="right">
					<view class="num" v-if="num>0">{{num}}</view>
					<image class="icon" src="/static/index_1.png"></image>
					<view class="txt">待办</view>
				</view>
			</view>
		</view>
		<view :style="{height:'calc(44px + '+ statusH +')'}"></view>
	</view>
</template>

<script>
	export default {
		name: 'UniGrid',
		props: {
			// 每列显示个数
			num: {
				type: Number,
				default: 0
			},
			title:{
				type:String,
				default:'首页'
			}
		},
		data() {
			return {
				statusH:this.statusH,
				navH:this.navH
			};
		}
	}
</script>

<style scoped lang="scss">
	.nav-box{
		position: fixed;
		top: 0;
		left: 0;
		width: 100%;
		background: #2BAD4C;
		z-index: 999999;
		.nav{
			display: flex;
			justify-content: space-between;
			flex-flow: nowrap;
			align-items: center;
			height: 44px;
			padding: 0 20px;
			box-sizing: border-box;
			.left{
				height: 44px;
				min-width: 44px;
			}
			.title{
				font-size: 16px;
				color: #FFFFFF;
				font-weight: bold;
			}
			.right{
				display: flex;
				justify-content: flex-start;
				flex-flow: column;
				align-items: center;
				position: relative;
				.num{
					position: absolute;
					top: -5px;
					right: -5px;
					width: 14px;
					height: 14px;
					background: red;
					border-radius: 50%;
					color: #FFFFFF;
					font-size: 8px;
					text-align: center;
					line-height: 14px;
					z-index: 2;
				}
				.icon{
					width: 12px;
					height: 15px;
					margin-bottom: 2px;
				}
				.txt{
					color: #FFFFFF;
					font-size: 10px;
				}
			}
		}
	}
</style>
